#include <iostream>

using namespace std;

typedef long long LL;

int n;
LL m;
LL a[25];

int main()
{
    cin >> n >> m;
    for(int i = 0; i < n; i++) cin >> a[i];
    LL ret = 0;
    for(int st = 1; st < (1 << n); st++)
    {
        int cnt = 0;
        LL ret1 = m;
        for(int j = 0; j < n; j++)
            if(st & (1 << j))
            {
                ret1 /= a[j];
                cnt++;
            }
        if(cnt % 2 == 1) ret += ret1;
        else ret -= ret1;
    }
    cout << ret << endl;
    return 0;
}
